import request from "@/utils/request";




export function add(data,type) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/room",
    method: type,
    data

  });

}
export function search(params) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/building/condition",
    method: "get",
    params

  });

}
export function searchtype(params) {
  return request({
    url: "/sinohis/pension/sys/dictionary/findAllRoomType/"+params.institutionNumber,
    method: 'get',
    params

  });

}
export function searchbuilding(params) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/building/"+params.number+'/'+params.institutionNumber,
    method: 'get',
    params

  });

}
export function condition(params) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/room/condition",
    method: "get",
    params

  });

}
export function doDelete(params) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/room/remove/"+params.number+'/' + params.institutionNumber+'/'+params.roomCode+'/'+params.floor+'/'+params.unit,
    method: "DELETE",
    params

  });

}
export function disable(data) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/room/disable/"+data.number+'/' + data.institutionNumber+'/'+data.roomCode+'/' + data.floor+'/'+data.unit,
    method: "PUT",
    data

  });

}
export function enableRoom(data) {
  return request({
    url: "/sinohis/pension/profession/bedmanager/room/enableRoom/"+data.number+'/' + data.institutionNumber+'/'+data.roomCode+'/' + data.floor+'/'+data.unit,
    method: "PUT",
    data

  });

}
